import request from '@/utils/request'

// 分页查询
export function page(query) {
  return request({
    url: '/api/admin/element/list',
    method: 'get',
    params: query
  })
}

// 添加
export function addObj(obj) {
  return request({
    url: '/api/admin/element',
    method: 'post',
    data: obj
  })
}

// 查看明细
export function getObj(id) {
  return request({
    url: '/api/admin/element/' + id,
    method: 'get'
  })
}
// 删除
export function delObj(id) {
  return request({
    url: '/api/admin/element/' + id,
    method: 'delete'
  })
}
// 修改
export function putObj(id, obj) {
  return request({
    url: '/api/admin/element/' + id,
    method: 'put',
    data: obj
  })
}
